package com.xizi.atomic;

import java.util.concurrent.CountDownLatch;

public class CountDownLatchTest {

    public static void main(String[] args) throws InterruptedException {
        CountDownLatch countDownLatch = new CountDownLatch(1);
        new Thread(new Runnable() {
            @Override
            public void run() {
                countDownLatch.countDown();
            }
        }, "线程1").start();
        countDownLatch.await();
    }
}
